<@_content id=id>
	<#assign content=object/>
	<@_category id=object.categoryId>
		<#assign category=object/>
	</@_category>
	<#assign attribute=getContentAttribute(id)/>
	<#assign texts=(attribute.text!'')?split('_page_break_tag_')/>
	<#assign pageIndex=(pageIndex!'1')?number/>
	<#assign text=texts[pageIndex-1]/>
	<#assign totalCount=texts?size/>
</@_content>
<!DOCTYPE html>
<html lang="zh">
<head>
	<title>${content.title} - ${category.name}</title>
	<meta name="keywords" content="<#list getKeywords(content.title) as a>${a}<#sep>,</#list>"/>
	<meta name="description" content="${content.description}"/>
	<script src="${site.sitePath!}js/jquery-1.9.1.min.js"></script>
</head>
<body>
	<header>
		<h1>${(site.name)!}</h1>
	</header>
	<nav>
		<a href="${base}">首页</a>
<@_categoryList>
	<#list page.list as a>
		<a href="${a.url!}" target="_blank">${a.name}</a>
	</#list>
</@_categoryList>
	</nav>
<#if content?has_content>
	<main>
		<article>
			<h1><a href="${content.url!}">${content.title}</a></h1>
			<p><#if content.copied>来源：<a href="${(attribute.sourceUrl)!}" target="_blank">${(attribute.source)!}</a></#if> ${content.author!} ${content.editor!} ${content.publishDate?datetime} 阅读:<em>loading...</em></p>
			<div>${text?no_esc!}</div>
		<#if content.tags?has_content>
			<div>
				标签：
				<@_tag ids=content.tags>
					<#list map?keys as key>
						<em>${map[key].name}</em>
					</#list>
				</@_tag>
			</div>
		</#if>
			<div>
				<#if pageIndex gt 1>
					<a href="?id=${id}&pageIndex=${pageIndex-1}">上一页</a>
				<#else>
					<span>上一页</span>
				</#if>
				<#list 1..totalCount as n>
					<#if n=pageIndex>
						${n}
					<#else>
						<a href="?id=${id}&pageIndex=${n}">${n}</a>
					</#if>
				</#list>
				<#if pageIndex lt totalCount>
					<a href="?id=${id}&pageIndex=${pageIndex+1}">下一页</a>
				<#else>
					<span>下一页</span>
				</#if>
			</div>
			<script>
				$.getJSON('${site.dynamicPath!}api/contentClick?id=${content.id}&callback=?', function(data){
					$('article p em').text(data.clicks);
				});
			</script>
		</article>
		<aside>
			<h3>热门内容</h3>
			<ul>
<@_contentList categoryId=category.id containChild=true orderField='clicks' count=10>
	<#list page.list as a>
				<li><a href="<#if a.onlyUrl>${site.dynamicPath}content/redirect.do?id=${a.id}<#else>${a.url!}</#if>" target="_blank">${a.title}</a><span>${a.clicks}</span></li>
	</#list>
</@_contentList>
			</ul>
		</aside>
	</main>
<#else>
	<main>
		<h2>没有此内容</h2>
	</main>
</#if>
	<footer>
		Copyright &copy; ${.now?string('yyyy')}
	</footer>
</body>
</html>